home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIScrollable.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  129 lines

  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is the Mozilla browser.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications, Inc.
  20.  * Portions created by the Initial Developer are Copyright (C) 1999
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   Travis Bogard <travis@netscape.com>
  25.  *
  26.  * Alternatively, the contents of this file may be used under the terms of
  27.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  28.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29.  * in which case the provisions of the GPL or the LGPL are applicable instead
  30.  * of those above. If you wish to allow use of your version of this file only
  31.  * under the terms of either the GPL or the LGPL, and not to allow others to
  32.  * use your version of this file under the terms of the MPL, indicate your
  33.  * decision by deleting the provisions above and replace them with the notice
  34.  * and other provisions required by the GPL or the LGPL. If you do not delete
  35.  * the provisions above, a recipient may use your version of this file under
  36.  * the terms of any one of the MPL, the GPL or the LGPL.
  37.  *
  38.  * ***** END LICENSE BLOCK ***** */
  39.  
  40. #include "nsISupports.idl"
  41.  
  42. /**
  43.  * The nsIScrollable is an interface that can be implemented by a control that
  44.  * supports scrolling.  This is a generic interface without concern for the 
  45.  * type of content that may be inside.  It simply deals blindly with scroll
  46.  * position as a composite of the lowest possible scroll position, the highest
  47.  * possible position and the current position lying somewhere between the 
  48.  * min and the max. 
  49.  */
  50.  
  51. [scriptable, uuid(919e792a-6490-40b8-bba5-f9e9ad5640c8)]
  52. interface nsIScrollable : nsISupports
  53. {
  54.     /*
  55.     Constants declaring the two scroll orientations a scroll bar can be in.
  56.         ScrollOrientation_X - Horizontal scrolling.  When passing this
  57.                 in to a scroll position method you are requesting or
  58.                 setting the positions for the horizontal scroll bar.
  59.         ScrollOrientation_Y - Vertical scrolling.  When passing this
  60.                 in to a scroll position you are requesting or setting
  61.                 the positions for the vertical scroll bar.
  62.     */
  63.     const long ScrollOrientation_X = 1;
  64.     const long ScrollOrientation_Y = 2;
  65.  
  66.     /*
  67.     Retrieves or Sets the current thumb position to the curPos passed in for the
  68.     scrolling orientation passed in.  curPos should be between minPos and maxPos.
  69.  
  70.     @return    NS_OK - Setting or Getting completed successfully.
  71.                 NS_ERROR_INVALID_ARG - returned when curPos is not within the
  72.                     minPos and maxPos.
  73.     */
  74.     long getCurScrollPos(in long scrollOrientation);
  75.     void setCurScrollPos(in long scrollOrientation, in long curPos);
  76.  
  77.     /*
  78.     This function atomizes the ability to scroll in two dimensions at the same
  79.     time.
  80.     */
  81.     void setCurScrollPosEx(in long curHorizontalPos, in long curVerticalPos);
  82.  
  83.     /*
  84.     Retrieves or Sets the valid ranges for the thumb.  When maxPos is set to 
  85.     something less than the current thumb position, curPos is set = to maxPos.
  86.  
  87.     @return    NS_OK - Setting or Getting completed successfully.
  88.                 NS_ERROR_INVALID_ARG - returned when curPos is not within the
  89.                     minPos and maxPos.
  90.     */
  91.     void getScrollRange(in long scrollOrientation, out long minPos, out long maxPos);
  92.     void setScrollRange(in long scrollOrientation, in long minPos, in long maxPos);
  93.  
  94.     /*
  95.     This function atomizes the ability to set the ranges in two dimensions at 
  96.     the same time.
  97.     */
  98.     void setScrollRangeEx(in long minHorizontalPos, in long maxHorizontalPos,
  99.         in long minVerticalPos, in long maxVerticalPos);
  100.  
  101.     /*
  102.     Constants declaring the states of the scroll bars.
  103.     ScrollPref_Auto - bars visible only when needed.
  104.     ScrollPref_Never - bars never visible, even when scrolling still possible.
  105.     ScrollPref_Always - bars always visible, even when scrolling is not possible
  106.     */
  107.     const long Scrollbar_Auto = 1;
  108.     const long Scrollbar_Never = 2;
  109.     const long Scrollbar_Always = 3;
  110.  
  111.     /*
  112.     Retrieves or Set the preferences for the scroll bar.
  113.     current is 'scrolling preference for this document'
  114.     default is 'scrolling preference for all documents in this shell'
  115.     resetScrollbarPreferences resets current to default
  116.     */
  117.     long getDefaultScrollbarPreferences(in long scrollOrientation);
  118.     void setDefaultScrollbarPreferences(in long scrollOrientation, in long scrollbarPref);
  119.  
  120.     /*
  121.     Get information about whether the vertical and horizontal scrollbars are
  122.     currently visible.  nsnull is a valid argument.  If you are only interested
  123.     in one of the visibility settings pass nsnull in for the one you aren't
  124.     interested in.
  125.     */
  126.     void getScrollbarVisibility(out boolean verticalVisible, 
  127.         out boolean horizontalVisible);
  128. };
  129.